package vtc;

import java.util.Date;
import java.util.concurrent.TimeUnit;

public class OutputUnitExample extends OutputUnit
{
	Date oldDate_;
	
	OutputUnitExample(String id, VtcArrayBlockingQueue outQueues[])
	{
		super(id, outQueues);
		oldDate_ = new Date();
	}
	
	public void outputProcess() throws InterruptedException
	{
		Object event = inValue_.getEvent();
		Date timeTag = inValue_.getTimeTag();
		if(oldDate_ == timeTag)
			System.out.print(event.toString() + " " + timeTag.toString() + "\n");
		else
			System.out.print("                   "+event.toString() + " " + timeTag.toString() + "\n");
		oldDate_ = timeTag;
	}
}